Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech v1 #3266

Merged
merged 7 commits into from
Apr 5, 2017
Merged

Speech v1 #3266

merged 7 commits into from
Apr 5, 2017

Conversation

lukesneeringer
Copy link
Contributor

@lukesneeringer lukesneeringer commented Apr 3, 2017

This updates our manual client library to the Speech v1 API.

This entails several backwards incompatible changes:

  • The language_code parameter is no longer optional anywhere. It must be explicitly specified, and does not default to 'en-US'.
  • The sync_recognize method has been renamed to recognize on every class where it appears.
  • The async_recognize method has been renamed to long_running_recognize on every class where it appears.
  • The sample_rate parameter and property has been renamed to sample_rate_hertz everywhere it appears.

Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The START_OF_SPEECH, END_OF_SPEECH, and END_OF_AUDIO events have been removed.

@lukesneeringer lukesneeringer self-assigned this Apr 3, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 3, 2017
Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly OK. Lot's of cosmetic, not much content

profanity_filter=profanity_filter,
speech_context=SpeechContext(phrases=speech_context))
sample_rate_hertz=sample.sample_rate_hertz,
speech_contexts=[SpeechContext(phrases=speech_contexts)],

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -68,7 +68,7 @@ def __init__(self, credentials=None, _http=None, _use_grpc=None):
self._use_grpc = _use_grpc

def sample(self, content=None, source_uri=None, stream=None, encoding=None,
sample_rate=None):
sample_rate_hertz=None):

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

speech/setup.py Outdated
@@ -50,14 +50,14 @@
}

REQUIREMENTS = [
'google-cloud-core >= 0.24.0, < 0.25dev',
'google-cloud-core >= 0.24.0, < 0.26dev',

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

speech/setup.py Outdated
]

setup(
name='google-cloud-speech',
version='0.24.0',
version='0.25.0',

This comment was marked as spam.

@@ -46,6 +47,9 @@ def _wait_until_complete(operation, max_attempts=10):
:rtype: bool
:returns: Boolean indicating if the operation is complete.
"""
# This bizarre delay is necessary because the v1 API seems to return
# the v1beta1 type URL sometimes if you poll too soon.
time.sleep(3)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Apr 5, 2017

LGTM pending CI

@lukesneeringer
Copy link
Contributor Author

@gguuss Are the samples ready for this? We are ready to push it out once your documentation is updated.

@gguuss
Copy link
Contributor

gguuss commented Apr 5, 2017

I'll let y'all know when I have my change in a branch

@gguuss
Copy link
Contributor

gguuss commented Apr 5, 2017

@theacodes
Copy link
Contributor

@lukesneeringer seems weird that the samples have to do speech_client.speech_api.x?

@lukesneeringer
Copy link
Contributor Author

@jonparrott We do not. Those changes are red in the diff. :-)

@lukesneeringer lukesneeringer merged commit a9268a3 into master Apr 5, 2017
@lukesneeringer lukesneeringer deleted the speech-v1 branch April 5, 2017 21:34
@lukesneeringer
Copy link
Contributor Author

@gguuss I am ready to push this to PyPI, as soon as you say you are ready.

@lukesneeringer
Copy link
Contributor Author

@gguuss Poke. (This is due today, so I will push it to PyPI around noon regardless.)

@gguuss
Copy link
Contributor

gguuss commented Apr 7, 2017

I'm ready to go.

@nandoz
Copy link

nandoz commented Apr 20, 2017

hello

richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
This updates our manual client library to the Speech v1 API.

This entails several **backwards incompatible changes**:

  * The `language_code` parameter is no longer optional anywhere. It must be explicitly specified, and does _not_ default to `'en-US'`.
  * The `sync_recognize` method has been renamed to `recognize` on every class where it appears.
  * The `async_recognize` method has been renamed to `long_running_recognize` on every class where it appears.
  * The `sample_rate` parameter and property has been renamed to `sample_rate_hertz` everywhere it appears.

Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The `START_OF_SPEECH`, `END_OF_SPEECH`, and `END_OF_AUDIO` events have been removed.
atulep pushed a commit that referenced this pull request Apr 3, 2023
This updates our manual client library to the Speech v1 API.

This entails several **backwards incompatible changes**:

  * The `language_code` parameter is no longer optional anywhere. It must be explicitly specified, and does _not_ default to `'en-US'`.
  * The `sync_recognize` method has been renamed to `recognize` on every class where it appears.
  * The `async_recognize` method has been renamed to `long_running_recognize` on every class where it appears.
  * The `sample_rate` parameter and property has been renamed to `sample_rate_hertz` everywhere it appears.

Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The `START_OF_SPEECH`, `END_OF_SPEECH`, and `END_OF_AUDIO` events have been removed.
atulep pushed a commit that referenced this pull request Apr 18, 2023
This updates our manual client library to the Speech v1 API.

This entails several **backwards incompatible changes**:

  * The `language_code` parameter is no longer optional anywhere. It must be explicitly specified, and does _not_ default to `'en-US'`.
  * The `sync_recognize` method has been renamed to `recognize` on every class where it appears.
  * The `async_recognize` method has been renamed to `long_running_recognize` on every class where it appears.
  * The `sample_rate` parameter and property has been renamed to `sample_rate_hertz` everywhere it appears.

Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The `START_OF_SPEECH`, `END_OF_SPEECH`, and `END_OF_AUDIO` events have been removed.
parthea pushed a commit that referenced this pull request Oct 21, 2023
parthea pushed a commit that referenced this pull request Oct 22, 2023
This updates our manual client library to the Speech v1 API.

This entails several **backwards incompatible changes**:

  * The `language_code` parameter is no longer optional anywhere. It must be explicitly specified, and does _not_ default to `'en-US'`.
  * The `sync_recognize` method has been renamed to `recognize` on every class where it appears.
  * The `async_recognize` method has been renamed to `long_running_recognize` on every class where it appears.
  * The `sample_rate` parameter and property has been renamed to `sample_rate_hertz` everywhere it appears.

Additionally, the backend API contains a backwards incompatible change which does not require a code change in the client library, but will likely require one downstream: The `START_OF_SPEECH`, `END_OF_SPEECH`, and `END_OF_AUDIO` events have been removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants